<%@ page contentType="text/html;charset=UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<base href=" <%=basePath%>"> 
<head>
<%@ include file="/jsp/common/commonJs.jspf" %>
<%@ include file="/jsp/common/commonCss.jspf" %>
<title>用户增删改查</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/user/user.js"></script>
</head>
<body>
	<div id="div" style="width: 100%; height: 100%;">
	
		<!-- 插入用户begin -->
		<div id="div-insert" style="height:100%; width: 1000px; margin:0 auto;">
			<h1>插入用户</h1>
			<table>
				<tr>
					<td>用户名：</td>
					<td><input id="username" type="text" name="username" value="用户1"></td>					
				</tr>
				<tr>
					<td>密码：</td>
					<td><input id="password" type="password" name="password" value="123456"></td>					
				</tr>
				<tr>
					<td>昵称：</td>
					<td><input id="nickname" type="text" name="nickname" value="昵称"></td>					
				</tr>
				<tr>
					<td>邮箱：</td>
					<td><input id="email" type="text" name="email" value="251068550@qq.com"></td>					
				</tr>
				<tr>
					<td>手机：</td>
					<td><input id="mobilePhoneNumber" type="text" name="mobilePhoneNumber" value="13285979235"></td>					
				</tr>
				<tr>
					<td>性别：</td>
					<td>
						<select id="gender" name="gender">
							<option>男</option>
							<option>女</option>
						</select>
					</td>					
				</tr>
				<tr>
					<td>生日：</td>
					<td><input id="birthday" type="text" name="birthday" value="1999-09-09 09:09:09"></td>					
				</tr>
				<tr>
					<td><input id="btnSubmit" type="button" value="插入用户" onclick="insertUser()"/></td>
				</tr>
			</table>
			<p id="result"></p>
		</div>
		<!-- 插入用户end -->
		<!-- 查询用户begin -->
		<div id="div-query" style="height:100%; width: 1000px; margin:0 auto;">
			<h1>查询用户</h1>
			<table>
				<tr>
					<td>用户名：</td>
					<td><input id="username2" type="text" name="username" value="nicmic"></td>					
				</tr>
				<tr>
					<td><input id="btnSubmit2" type="button" value="查询用户" onclick="getUser()"/></td>
				</tr>
			</table>
			<p id="result2"></p>
			<table id="tb-update">
				<tr>
					<td>id：</td>
					<td><input id="userId" type="text" name="userId"></td>					
				</tr>
				<tr>
					<td>用户名：</td>
					<td><input id="username22" type="text" name="username"></td>					
				</tr>
				<tr>
					<td>密码：</td>
					<td><input id="password22" type="password" name="password"></td>					
				</tr>
				<tr>
					<td>昵称：</td>
					<td><input id="nickname22" type="text" name="nickname"></td>					
				</tr>
				<tr>
					<td>邮箱：</td>
					<td><input id="email22" type="text" name="email"></td>					
				</tr>
				<tr>
					<td>手机：</td>
					<td><input id="mobilePhoneNumber22" type="text" name="mobilePhoneNumber"></td>					
				</tr>
				<tr>
					<td>性别：</td>
					<td>
						<select id="gender22" name="gender">
							<option>男</option>
							<option>女</option>
						</select>
					</td>					
				</tr>
				<tr>
					<td>生日：</td>
					<td><input id="birthday22" type="text" name="birthday"></td>					
				</tr>
				<tr>
					<td><input id="btnSubmit22" type="button" value="修改用户" onclick="updateUser()"/></td>
				</tr>
			</table>
		</div>
		<!-- 查询用户end -->
		<!-- 删除用户begin -->
		<div id="div-delete" style="height:100%; width: 1000px; margin:0 auto;">
			<h1>删除用户</h1>
			<table>
				<tr>
					<td>用户名：</td>
					<td><input id="username3" type="text" name="username" value="nicmic"></td>					
				</tr>
				<tr>
					<td><input id="btnSubmit3" type="button" value="删除用户" onclick="deleteUser()"/></td>
				</tr>
			</table>
			<p id="result3"></p>
		</div>
		<!-- 删除用户end -->
	</div>	
</body>
</html>